package models

import (
	"time"
)

type User struct {
	Id               string `orm:"pk"`
	LoginId          string `orm:"column(login_id)"`
	Name             string
	Password         string
	Salt             string
	AuthMethod       string    `orm:"column(auth_method)"`
	LastLoginTime    time.Time `orm:"column(last_login_time);type(datetime)"`
	LastPasswordTime time.Time `orm:"column(last_password_time);type(datetime)"`
	CreateTime       time.Time `orm:"column(create_time);type(datetime)"`
	CreateBy         string    `orm:"column(create_by)"`
	LastUpdateBy     string    `orm:"column(last_update_by)"`
	LastUpdateTime   time.Time `orm:"column(last_update_time);type(datetime)"`

	UserSettings []*UserSetting `orm:"reverse(many)"` // fk 的反向关系
}
